home *** CD-ROM | disk | FTP | other *** search
- Path: news.uni-jena.de!news
- From: mkt@isun04.inf.uni-jena.de (Tilo Koerbs)
- Newsgroups: comp.lang.c++
- Subject: ostrstream: Who knows it exectly?
- Date: 30 Jan 1996 13:07:39 GMT
- Organization: Lehrstuhl fuer Rechnerarchitektur- und kommunikation, FSU Jena
- Message-ID: <4el56r$357@fsuj01.rz.uni-jena.de>
- Reply-To: mkt@isun04.inf.uni-jena.de
- NNTP-Posting-Host: isun15.inf.uni-jena.de
-
- Look at this piece of code:
-
- ostrstream buf; // dynamic buffer.
- // Fill buf...
- buf << ends; // Append NULL-byte.
- char *p = buf.str(); // Freeze buffer.
-
- And now the problem: The users must delete the buffer
- by there own. But HOW???
- This way: delete p;
- Or this way: delete [] p;
-
- Different books give different answers!
- Is it implementation dependend? (I don't think so!)
- Or can I do both? (I don't think so too!)
-
-
-